=========================================================================
=      Midtown Madness 2 import/export for Zanoza Modeler               =
=                                by Oleg M. last updated: 12.apr.2002   =
=========================================================================

This filter is for ZModeler v1.06b and higher.

========================
What's new?
  This version includes a text-MTX file generation code that can simplify
writing a tuning files. Also (not tested yet) assumes valid exporting of
multiple (more than 4) paintjobs.


========================
1. Installing the filter
	To install the filter you must copy PKG.ZMF file into Filters\
subfolder (create it if it doesn't exist).

========================
2. Importing Meshes
2.1
	Extract any existen car into it's own folder, like AUDITT\
DeAR2 will create Geometry\ folder with meshes (PKG files) and requiring
MTX files. The MTX files stores bounding and offset information for some
objects: vpauditt_whl0.mtx stores offset for WHL0 object. These files are
required, since otherwize the geometry will lose offsets.
	Extract according Boundary object (Bound\vpauditt_BOUND.bnd). This text
file (bnd) describes geometry of bounding obejct - the object used for col-
lisions. DeAR2 extracts it to Bound\ subfolder.
	Extract all requiring textures to the same folder. DeAR2 will automati-
cally extract them into Texture\ subfolder. You will need to convert ALL
TEX files to 32bit or 24bit TGA files.
You can also extract according TUNE files.
--------
	Thus you get the following structure:
AUDITT\
	BOUND\
		carname_BOUND.bnd
	GEOMETRY\
		<carname.PKG, carname_dash.PKG, ... several MTX files>
	TEXTURE\
		<several TGA files>
	TUNE\
		BANGER\
			<several .dgBangerData files>
		CAMERA\
			.camPovCS
			_dash.camPovCS
			_far.camTrackCS
			_near.camTrackCS>
		VEHICLE\
			.vehCarDamage
			.vehcarsim
			.vehGyro
			.vehStruck
			_opp.vehcarsim
		.asNode
		.info
		.mmMirror
		_dash.asNode
--------
	These files with this directory structure will be packed later into AR file.

2.2	Lunch ZModeler and hit Import button. Then choose your PKG file and doubleclick
on it to import.
	Hit 'E' key to activate Materials Editor.
	In Material editor: The upper droplist contains names of textures (with marks '0',
'1'. Like "auditt_siver_bk0"). Choose these materials one by one and look at sphere smaple.
If on any material the sphere is untextured, than writedown textures' name to extract it
later. Close material editor.
	If you have written any textures names, then first of all check out whether these
textures exist in Texture\ folder. Second, make sure that TGA file is valid (convert it to
BMP if neccessary). Third, re-extract it from mm2tex.ar file.

2.3	NOTE:
	ALL OBJECTS THAT HAS AN ACCORDING ".MTX" FILE HAS ":m" suffix. If an object has this
suffix, then a new MTX file will be generated for this object when exporting geometry. Thus,
if you have created an object (wheel, for the instance), make sure you have named in cor-
rectly and added ":m" suffix.
	ALSO NOTE, that if a BOUNDARY object have been found, then it will appear as white
matte object with "BOUND" name. You can modify this object to adjust collision-model of your
car. Notice, that BODY object is fitted into this BOUND object... partly-fit: The lower part
of BOUND object is higher than lower part of BODY - that's why the original Midtown cars
don't hit curbs.

	You can pack these files with WinZip using "Add", "Add with wildcards". Thus you
will create a ZIP file with remained directories structure.
	   
2.4	BREAK objects are the obejcts that can be detached from car at runtime and can be
left on the asphalt after you hit something. There are several types of BREAK objects, sup-
ported by the MM2 game:
BREAK0  - object falls (detaches) when left-front corner of the vehicle was hit.
BREAK1  - ... right-front ...
BREAK2  - ... right-rear...
BREAK3  - ... left-rear...
BREAK01 - ... front of the car was hit.
BREAK12 - ... right side of the car was hit.
BREAK23 - ... rear of the car was hit.
BREAK03 - ... left side of the car was hit.
and these are THE ONLY "BREAK" objects supported!

2.5	WHL objects the same as in MM1:
WHL0, WHL1, WHL2, WHL3 are left-front, right-front, left-rear and right-rear accordingly.

2.6	TLIGHT, BLIGHT, RLIGHT, HLIGHT objects are the tail-, break-, reverse- and head-
lights accordingly. The HEADLIGHT0_H and HEADLIGHT1_H objects are treated as GLOWING OBJECT
position. The geometry, texture and mapping of these two objects are ignored, but center
position and materials' color are used. You do not need to assign "fxltglow" texture to
these two objects. All you need is to assign colored (usually bright-yellow) matte material.
	But all other "..."-light objects must have texture and mapping assigned. Moreover,
the special tehnique makes these objects "shine". The technique is the following:
	Open Material editor with 'E' key. Choose material "fxltglowred0" - this is material
for break- and tail-lights (red). NOTICE that material color is et to BLACK and texture
applyment type is set to "Additive". You should remember it when creating your own shine
materials for shining obejcts (syrens or may be other).


===========================
3. Editing meshes.
	First of all I strongly recommend to download tutorial on "how to create cars in
ZModeler" at http://www.zmodeler.boom.ru
	Second, you should remember the following:
	-----------------------
	MIDTOWN 2 (as well as 1) IS AIMED TO LOW-POLYGON-COUNT OBEJCTS! YOUR MESHES SHOULD
	NOT EXCEED 800 POLYGONS PER CARS' BODY AND 40-80 PER EACH WHEEL. ALWAYS TRY TO MAKE
	AS LESS POLYGONS AS ONLY POSSIBLE. INCREASE QUANTITY AND QUALITY OF TEXTURES INSTEAD
	TO MAKE GOODLOOKING CARS.
	-----------------------
	Also, if you create a high-detailed meshes, then this car might crash the game when
you hit something. This happens becouse the game cant recalculate damages on textures accor-
ding to the meshes, since there is A LOT of polygons in the mesh. If the game doesn't crash,
then anyway you will notice the miliseconds of delay when you hit something. It might be up
to one second delay!


========================
4. Export PKG files
	Hit Export button. Choose a filetye in droplist ("Midtown Madness 2 PKG files") and
choose object to overwrite. NOTE: if you type file name manually, IT MUST HAVE EXTENSION:
.PKG (for the instance: mycar.pkg)!!!
------------------
	After you hit Save button in this dialog box, the newer dilao box will appear where:
(*) Standard Vehicle - used to export standard vehicle of all types (cops, rodsters, trucks.
( ) Dashboard - used to export dashboard objects (roof, dash, wheel, needles etc.)
( ) Trailer - used to export trailers: it uses TRAILER name insted BODY and TWHL instead WHL
	The right side of this dialog bos is for adjusting names of custom paintjobs (for
multiple colors purpose). There is a checlbox that activates multiple colors sectino, 
"Replace suffix" and "...with suffix" edit boxes, list of suffices and two buttons: Add and
Remove.
	The idea is the following: suppose you need a car with three paintjobs: White,
Red and Racing skin. You creates all according textures and renames them to mycar_side_white
mycar_side_red, mycar_side_race, ..., mycar_rear_race. You get a three sets of texture.
Suppose, in ZModeler you have loaded _white textures set: thus you have to type "_white" in
"Replace suffix" edit-box. Then hit "Remove" button to remove default "_blue" entry from the
list. Type "_red" in "...with suffix" edit-box and hit Add button. Type "_race" in "...with
suffix" edit-box and hit Add button. Thus you'll have two entries in list box. The PKG
filter will generate three sets of textures in PKG file: first is default - all the texture
that have been loaded to ZModeler and used in obejcts remains unchanged; second - the same
textures, but with _white suffix been replaced to _red suffix; and the third set with _white 
suffix been replaced to _race suffix. All these textures should be in the Texture subfolder.
The MM2 will automatically apply a set of textures to a car when you change color in game.
	Hit Export button and wait.
	PKG filter will automatically:
- generate Geometry\ .MTX files for all objects with ":m" suffix.
- generate Bound\ _BOUND.bnd file from "BOUND" object.
- (by default) create a backup for the PKG file if you are rewiriting existen file.


========================
5. Assembling AR file
5.1	Before assembling AR file:

- make sure that the PKG file includes the following objects: (verify it in ZModeler with
Objects floatbar):
BODY_H, BODY_M, BODY_L, BODY_VL,
SHADOW_H, SHADOW_M,
WHL0_H, WHL0_M, WHL0_L,
WHL1_H, WHL1_M, WHL1_L,
WHL2_H, WHL2_M, WHL2_L,
WHL3_H, WHL3_M, WHL3_L
... all other obejcts are optional.

- make sure that all MTX file starts with the same name as PKG file ("vpauditt_" for
"vpauditt.pkg")

- make sure that TUNE\ folder has all the files, listed in 2.1. The TUNE\BANGER folder
must has "carname_WHL0.dgBangerData", ..._WHL1..., ..._WHL2... and ..._WHL3... files!
Four files in TUNE\CAMERA folder, five files in TUNE\VEHICLE folder and four (or three)
files in TUNE root directory.

- edit the .info file in TUNE folder:
	- !TYPE FILENAME OF YOU CAR IN "BaseName=" line and MAKE SURE THAT ALL TUNE FILES
	AND PKG FILE starts with that name.
	- Specify valid amount of names "Colors=" section. Divied names	with "|" sign. For
	the instance: "Colors=White|Dark Red|ZModeler Racing Team".
	- Remove "LockColorMask=" line if present.

- make sure that all texture files for all colors-set are present in Texture\ folder.

5.2	Start WinZip (I recommend to assign a hotkey for WinZip' shortcut "Ctrl+Alt+W",
since you will use it A LOT.
	In WinZip:
-	Press "New" button or hit Ctrl-N. Locate the Midtown 2 folder and type your cars'
name in filename edit box ("vpauditt") and hit Enter. Thus you created empty ZIP archive.
If "Add" dialog box haven't appeared, hit "Add" button.
-	In Add dialog box locate the folder of your car and open it to display BOUND,
TEXTURE, GEOMETRY and TUNE folders in the list.
-	Hit "Add with wildcards" button. (If it's grayed, then hit cnacel, hit Add button
again and, while specifying the folder, don't activate an of files: use double-clicks on
folders names only!).
-	After adding all files into ZIP file it will display the list of files. All you need
	is to delete unnecessary files from it: Hold CTRL key down and mark all unneccessary
	files (*.BAK, unused** dgBangerData files in TUNE\, unused** MTX files in Geometry\)
	and so on. After merking all these files in WinZip Hit DEL and then Enter. You can
	also delete MM2 common textures (vpshdw, fxltglow, fxltglowred, carbottom and so on)
-	!NOTE:
	It's strongly recommended not to add new files after creating ZIP file. Use only
	New -> Add -> Add with wildcards sequence!
	It's strongly recommended not to delete all files from on folder in ZIP file. I mean
	not to delete all files (the only file) from BOUND\ folder. This folder remains in
	ZIP file but it's empty - this will crash MM2 on startup. The same safity with JPG
	folder and all other folders. If you don't need to add folder with Add with
	wildcards button, just delete ths floder before pressing button.

Ok. The ZIP file is ready, it doesn't have empty folders and there is no unneccessary files
in it. Now start Explorer. Locate this file and rename it's extension to ".AR" Thus you
rename "vpauditt.zip" to "vpauditt.ar" file. (The file is in MM2 main folder).


=================================
6	Lunching the game
	Start Midtown 2.
- It might crash on games' loading  screen when progrees bar is near the Beetles' rear wheel
Solution:
Wait and hit Enter. To fix that problem make sure that you have no empty folders in ZIP file
and you have no unncessary files in it. Also make sure that for all objects (excluding BODY,
SHADOW and T-, R-, B- LIHGT_H objects) there are according MTX file in Geometry\ and
according dgBangerData files in TUNE\BANGER folder. If you constantly get game crashing on
start screen then I recommend to delete all objects from PKG file, remaining only BODY_, and
four WHL objects (of cause, with _H,_M,_L suffixes... and a BODY_VL of cause). Thus you can
remove all unused MTX files and dgBangerData. Also, make sure that ALL files (excluding
textures) begins with cars' name (vpauditt) and THIS name is specified in .info file in
"BaseName=" line.
	Well, keep trying, start with simplest car ( Moon Rover ).

- The game crashes when you Hit "Select Vehicle" button.
There is an unknown object in PKG file or one or several textures haven't been found (the
hardest error). Hit Enter to get back to Windows...

- The game hangs with Black screen after loading city.
The same problem, but the error might also be in Tune files. May be unknown objetc in
_dash.PKG file or one ore several obejcts are missing. Might be missing one or several files
in TUNE\ folder.




========================
7. Background and notes.

First of all: Use at your own risk.

The ZModeler is NOT the Midtown 2 editor. ;)
All neccessary documentaion and tutorials on ZModeler are available at ZModelers' home page.


=======================
!!!!!!!!!!!!!!!!!!!!!!!
I don't convert or fix any cars!!! Don't even ask me to Convert/Make/Fix any car or any
part of it.  Big e-mails (more than 200k) are not downloaded and deleted from mail server,
if you haven't prior permission for sending big attachments.

All tech support on ZModeler is mostly described in ZModeler full documentation. Any other
questions about ZModeler can be posted at ZModelers' forum.


Midtown is a Madness 2 (c) Angel Studios Inc.
Commercial use of ZModeler is prohibited and belongs to it's developer.

========================
Tech Support, developer: <funspeed@softhome.net>
ZModelers' WEB page:      www.zmodeler.com

Other cool stuff at Midtown Fancs Club: http://mfc.inetria.com
                                Zanoza Modeler (c) Oleg M. 1999-2002
